package org.tong.schedule;

import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * 定时任务
 */
//@Service
//@EnableScheduling
public class ScheduleService {

    @Scheduled(fixedRate = 1000)
    @Async
    public void job1() {
        System.out.println(Thread.currentThread().getId() + " Job1每秒一次");
    }
}
